\documentclass[tikz]{standalone}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX, Mapping=tex-text]{Lato}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{xfp}

\begin{document}
\begin{tikzpicture}

\def\width{5}
\def\height{5}
\def\ox{\fpeval{\width /2}}
\def\oy{\fpeval{\height /2}}

\tiny
\path [use as bounding box] (0,0) rectangle (\width,\height);

% SHAPE
\filldraw [line width=0.5pt, fill=orange] (\ox,\oy) +(-1.5,-0.5) rectangle +(1.5,0.5);

% PORTS
\draw [line width=2pt] (\ox,\oy) ++(-1.5,0) node[right] {1} +(0,-0.5) -- +(0,0.5);
\draw [line width=2pt] (\ox,\oy) ++(1.5,0) node[left] {2} +(0,-0.5) -- +(0,0.5);

% DIMENSIONS
\draw [line width=0.5pt, {Stealth[length=5pt]}-{Stealth[length=5pt]}]
	(\ox,\oy) ++(0,-0.7) node[below] {L}
	+(-1.5,0) -- +(1.5,0);
\draw [line width=0.5pt, {Stealth[length=5pt]}-{Stealth[length=5pt]}]
	(\ox,\oy) ++(-1.7,0) node[left] {W}
	+(0,-0.5) -- +(0,0.5);

\end{tikzpicture}
\end{document}
